url = './data/'
all = []

data1 = ''
name1 = '六级词汇'
name2 = 'test'
with open(f'{url}{name1}.txt', 'rt') as fp:
    data1 = fp.read().split('\n')

count = 0
for item in data1:
    if (item not in all):
        all.append(item)
    else:
        count += 1
print(len(all))
print(count)

# data1 = ''
# all = []
# with open(f'{url}四级词汇.txt', 'rt', encoding='latin-1') as fp:
#     data1 = fp.read().split('\n')
#
# count = 0
# for item in data1:
#     item = item.split(' ')[0]
#     if (item not in all):
#         all.append(item)
#     else:
#         count += 1
# print(count)